<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<table width="100%">
	<tr align="center" class="firstrowtable">
		<td><strong>Product Name</strong></td>
		<td><strong>Image</strong></td>
		<td><strong>Price</strong></td>
		<td><strong>Brand</strong></td>
		<td><strong>Condition</strong></td>
		
		<td><strong>Edit</strong></td>
		<td><strong>Delete</strong></td>
	</tr>
	<c:forEach var ="item" items ="${requestScope.products}">
	<tr>
		
		<td>${item.productname}</td>
		<td align="center" width="10%"><img style="width:50px; height:50px;" src="${item.image1}" alt="#" border="0" /></td>
		<td>${item.price}</td>
		<td>${item.brand.brandname}</td>
		<td>${item.condition.conditionname}</td>
		
		<td align="center"><a href="EditProductJsp.do?productid=${item.productid}"><img src="images/btedit.png" alt="#" border="0" /></a></td>
		<td align="center"><a href ="DeleteProduct.do?productid=${item.productid}" onclick="return confirm('Are you sure you want to delete?')"><img src="images/btdelete.png" alt="#" border="0" /></a></td>
	</tr>
	</c:forEach>
</table>
<a href ="CreateProductJsp.do"><img src="images/btcreate.png" alt="#" border="0" /></a>